src := $(wildcard *.cpp)
objs :=$(patsubst %cpp,%o,$(src))

#LFLAGS := -L/opt/etherlab/lib/ -lethercat

myethercat:$(objs)
	g++ $^ $(LFLAGS) -o $@

%o:%cpp
	g++ -c -g $< -o $@


clean:
	rm *.o -rf myethercat
